package com.lwq.imserver.config;

import com.lwq.imserver.filter.XssFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2022/1/20 15:36
 */
@Configuration
public class WebConfig {

    /**
     * springsecurity加密类
     */
    @Bean
    public PasswordEncoder passwordencoder() {
        return new BCryptPasswordEncoder();
    }

    @Bean
    public XssFilter xssFilter(){
        return new XssFilter();
    }
}
